/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.araujogrosz.fractalcore;

/**
 *
 * @author rgrosz
 */
public class TextPrinter implements FractalPrinter {
    private String cor = ".,;=xkH#";
    
    
    @Override
    public void paint(int iteration, int x, int y) {
        System.out.printf(getColor(iteration+1));        
           System.out.printf(getColor(iteration+1));        
    }

    @Override
    public void paint(int x, int y) {
        System.out.printf("?");        
        System.out.printf("?");        
    }

    @Override
    public void paint() {
        System.out.println();
    }
    
    
    private String getColor(int iteration){ 
        int i = iteration;
        if(i < cor.length()){
            return cor.substring(i, i+1);
        }else{
            return "X";
        }
    
    }

    @Override
    public void paintOut(int x, int y) {
        System.out.printf(getColor(0));
        System.out.printf(getColor(0));
    }
}
